#ifndef CONTROLLER_FIELD_H

#define CONTROLLER_FIELD_H

#include "PotentialField.h"

/**
 * This is the Controller Potentialfield class
 * This will use the controller-sensors for usage, and e.g., calculate steering depending
 * on the charges in the PotentialField, the acceleration as a simple
 * sum-function for now
 * This works almost like as the Shortest path function, it tries to
 * get inside of the track 
 *
 */


#include <cmath>

class ControllerField : public PotentialField
{
public:

	/// Constructor for ControllerField
	ControllerField();

	/// Destructor for ControllerField
	~ControllerField();


	/**
	 * Updates all the angles for the
	 * ControllerField
	 */
	void update(CarState& cs);

	/**
	 * Finds the resulting angle from all angles
	 */
	const float getAngle(const float eangle = 0.0f);

	/**
	 * Finds the resulting speed
	 */
	const float getSpeed();


	void initAngles(float* const angles);

private:
	float angles[20];

};


#endif
